<?php
/**
 * @package qBase
 * @subpackage base
 * 
 */

/**
 * The QTime object is a static object with some usefull functions
 *
 * @package qBase
 * @subpackage base
 */
final class QTime extends QObject 
{
	/**
	 * Gets the current time in seconds as a float
	 * 
	 * @param integer $precision Optional. The precision of the returned value
	 *
	 * @return float The number of seconds
	 */
	public static function Microtime($precision = -1)
	{
		list($usec, $sec) = explode(' ', microtime());
		if ($precision >= 0)
			return round( (float) $sec + (float) $usec, $precision);
		else 
			return (float) $sec + (float) $usec;
	}
}

?>